﻿<script src="/Scripts/jquery-1.9.1.js"></script>
<script src="/Scripts/jquery-ui-1.10.1.js"></script>
<h1>Help Search</h1>
<script>
  $(function() {
    var availableTags = [
      "eTime",
      "OSP",
      "ProPricer",
      "SugarCRM"
    ];
    $( "#tags" ).autocomplete({
        source: availableTags,
        select: function (event, ui)
        {
            //alert("Selected!");
            switch (ui.item.value) {
                case "eTime":
                    window.location.href = "/HowTo/helpArticle?articleNum=3";
                    break;
                case "OSP":
                    window.location.href = "/HowTo/helpArticle?articleNum=2";
                    break;
                case "ProPricer":
                    window.location.href = "/HowTo/helpArticle?articleNum=1";
                    break;
                case "SugarCRM":
                    window.location.href = "/HowTo/helpArticle?articleNum=4";
                    break;
                default:
                    alert("Default Case Triggered. " + ui.item.value);
                    break;

            }
        }
    });
  });
  </script>

 
<div class="ui-widget">
  <label for="tags">Article Keywords: </label>
  <input id="tags" />
</div>